package com.ylfstu.map_;

import java.util.HashMap;
import java.util.Map;

@SuppressWarnings({"all"})
public class Map_ {
    public static void main(String[] args) {

        Map map = new HashMap();
        map.put("No1", "ylf");
        map.put("No2", "张无忌");
        map.put("No1", "张三丰");//当有k相同时，就等价于替换
        map.put("No3", "张三丰");
        map.put(null, null);
        map.put(null, "abc");
        map.put("No4", null);
        map.put("No5", null);
        map.put(1, "赵敏");
        map.put(new Object(), "金毛狮王");

        System.out.println(map.get("No3"));

        System.out.println(map);
    }
}
